# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=dragon
pkgver=24.02.2
pkgrel=0
pkgdesc="A multimedia player where the focus is on simplicity, instead of features"
url="https://kde.org/applications/multimedia/org.kde.dragonplayer"
# armhf blocked by extra-cmake-modules
# # s390x blocked by phonon-backend-vlc
arch="all !armhf !s390x"
license="GPL-2.0-only OR GPL-3.0-only"
depends="phonon-backend-vlc"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kjobwidgets-dev
	knotifications-dev
	kparts-dev
	kwidgetsaddons-dev
	kwindowsystem-dev
	kxmlgui-dev
	phonon-dev
	qt6-qtbase-dev
	samurai
	solid-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/dragon.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/dragon-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d495c8840fee63e67289040b0d82f5b5a7f47586f2a0054bb784956d8ffe9dbeb8230542713805f6a6aa7cfbe448cb6fcc4de4a88814e8567a522202b958a905  dragon-24.02.2.tar.xz
"
